package com.jyx.web.tcp;

import java.net.*;
import java.io.*;


//在客户端
public class TCPClient {
	public static void main(String[] args) throws Exception{
		Socket s=new Socket("192.168.0.10",9000);//连接服务端的ip和端口
		InputStream is=s.getInputStream();//获得输入流，读取服务端发来的信息
		InputStreamReader ir=new InputStreamReader(is);
		BufferedReader in=new BufferedReader(ir);
		for(int i=1;i<=30;i++){
			System.out.println(in.readLine());
		}
		s.close();
	}
}